********************************************************************************
* Exporting table for multi-country COVID paper (BGD3 sample)
* last updated: 2020-10-12
* Salim Benhachmi
********************************************************************************

clear all
use "$da/BGD5", clear

********************************************************************************

* Drop in income
gen drop_inc = (hh_inc > ec_q24_b) if hh_inc != . & ec_q24_b != . 

* increase in income
gen incr_inc = (hh_inc < ec_q24_b) if hh_inc != . & ec_q24_b != . 

********************************************************************************

keep if covid_sample == 1

local indicators drop_inc incr_inc

foreach ind of local indicators {
	sum `ind'
	loc mean_`ind' : di %10.2fc r(mean)
}

loc ratio = round(`mean_drop_inc' / `mean_incr_inc', 0.1)

clear
set obs 1

gen drop_inc = "`mean_drop_inc'"
gen incr_inc = "`mean_incr_inc'"
gen ratio = "`ratio'"

export excel using "$dtab/Inverse Table.xlsx", sheetmodify cell(B10)

********************************************************************************
